Coupled quadrilateral grid level set scheme for piezoelectric ink-jet simulation

ABSTRACT

Methods for finite-difference-based inkjet simulation enable more precise control of ink droplet size and shape. A discrete transformation (mapping) is constructed so that a quadrilateral grid in physical space is transferred to the uniform square grid in a computational space. Since the grid in the computational space is square, numerical finite difference differentiation can be easily done. Governing partial differential equations, including a viscosity term, a surface tension term, and a level set convection equation for two-phase flows, are derived on the quadrilateral grid and then transformed to the computational space for application on the uniform square grid. A stable and powerful numerical algorithm is developed to solve the derived and transformed equations to enable finite-difference-based ink-jet simulation.

RELATED APPLICATION DATA

[0001] This application is related to application Ser. No. 10/105,138, filed on Mar. 22, 2002 and entitled “A Slipping Contact Line Model and the Mass-Conservative Level Set Implementation for Ink-Jet Simulation,” filed in the names of the inventors of this application. The disclosure of this related application is incorporated herein by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a model and accompanying algorithm to simulate and analyze ink ejection from a piezoelectric print head. More particularly, the model of this invention includes a quadrilateral grid for finite-difference-based ink-jet simulation where the algorithm is designed to solve a set of partial differential equations for two-phase flows that have been newly developed on the quadrilateral grid. The quadrilateral grid is transformed to a uniform square grid, and the derivatives of various parameters (e.g., the velocities, pressure, and level set) in the newly developed partial differential equations are calculated on the uniform square grid. A stable and powerful numerical algorithm is developed to solve the derived equations. The simulation model may be embodied in software, hardware or combination thereof and may be implemented on a computer or other processor-controlled device.

[0004] 2. Description of the Related Art

[0005] Results of computational fluid dynamics (CFD) ink-jet simulation have been very useful in the design of piezoelectric ink-jet print heads. FIG. 1 shows how a practical inkjet simulation may be carried out. An analytical tool such as an equivalent circuit 11 receives as an input the dynamic voltage to be applied to the piezoelectric PZT actuator and simulates the ink behavior under the influence of the ink cartridge, supply channel, vibration plate, and PZT actuator. That is, from the input voltage and an ink flow rate, the equivalent circuit 11 calculates an inflow pressure that drives the CFD code 12. The CFD code 12 then solves the governing partial differential equations, i.e., the incompressible Navier-Stokes equations for two-phase flows, for fluid velocity, pressure and interface position, and feeds back the ink flow rate to the equivalent circuit. The sequence is repeated as long as needed.

[0006] A CFD code has been used by Seiko Epson to solve the Navier-Stokes equations. Such code employs the volume of fluid method (VOF) to take into account the ink-air interface. VOF performs fairly well with regard to mass conversation but is not so accurate on surface tension aspects of fluid flow, especially when the ink droplet is smaller than 5 pico liters. However, since the capability of ejecting ultra small ink droplets is essential for any photo quality ink-jet printer today, an improved modeling method which included the level set method was adopted by Seiko Epson to more accurately capture the ink-air interface in CFD simulations. Since there is a mathematical relation between the level set and the interface curvature, and hence the surface tension, the level set method excels whenever surface tension is important.

[0007] Because solving the level set equation by finite element analysis usually results in a serious mass conservation problem, finite difference analysis is usually the best choice among numerical schemes to be used with the level set method. FIG. 2 shows a typical rectangular grid for a finite difference analysis. Since the wall of the narrowing section of the modeled nozzle is not parallel to any coordinate axis, the discretized computational domain can not faithfully fit the real nozzle wall. The body-fitted quadrilateral grid in FIG. 3 does not have that problem. While a non-rectangular quadrilateral grid like the one in FIG. 3 can be naturally handled in finite element analysis, performing a finite difference analysis on such a grid is very difficult.

[0008] The first finite difference scheme for solving the incompressible Navier-Stokes equations on quadrilateral grids works well for single-phase fluids on a two-dimensional Cartesian coordinate system. The scheme was later extended to an axisymmetric coordinate system. It was not clear, however, how to extend the algorithm to two-phase flows, to include surface tension, and to include the level set convection equation.

OBJECT AND SUMMARY OF THE INVENTION OBJECT OF THE INVENTION

[0009] It is therefore an object of the present invention to provide a model and accompanying algorithm to simulate and analyze ink ejection that overcomes the above problems and enables more precise control of ink droplet size and shape.

SUMMARY OF THE INVENTION

[0010] According to one aspect of this invention, a method for simulating and analyzing fluid flow through, and ejection from, a channel is provided. The channel has a boundary between a first fluid that flows through the channel and a second fluid, and the method comprises the steps of: (a) performing finite difference analysis including solving, with reference to both a quadrilateral grid in a physical space and a uniform square grid in a computational space, equations governing the flow of the first fluid through the channel, wherein the partial differential equations were first derived for the quadrilateral grid in the physical space and then transformed to the computational space for application on the uniform square grid; and (b) simulating the flow of the first fluid through, and ejection from, the channel based on the performed finite difference analysis.

[0011] In another embodiment, a method for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid comprises the steps of: (a) deriving partial differential equations applicable to a quadrilateral grid in a physical space, including deriving a viscosity term, a surface tension term, and a level set convection equation for two-phase flows; (b) calculating a transformation for transforming the derived partial differential equations for application to a uniform square grid in a computational space; and (c) solving the derived and transformed partial differential equations to determine the flow of the first fluid through, and ejection from, the channel. Preferably, in step (c) the derivatives of velocity, pressure, and level set for the flow of the first fluid in the derived and transformed partial differential equations are calculated with reference to the uniform square grid in the computational space.

[0012] In another aspect, the invention involves an apparatus for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid. The apparatus comprises: means for performing finite difference analysis including solving, with reference to both a quadrilateral grid in a physical space and a, uniform square grid in a computational space, equations governing the flow of the first fluid through the channel, wherein the partial differential equations were first derived for the quadrilateral grid in the physical space and then transformed to the computational space for application on the uniform square grid; and means for simulating the flow of the first fluid through, and ejection from, the channel based on the performed finite difference analysis.

[0013] In another embodiment, an apparatus for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid comprises: means for deriving partial differential equations applicable to a quadrilateral grid in a physical space, including deriving a viscosity term, a surface tension term, and a level set convection equation for two-phase flows; means for calculating a transformation for transforming the derived partial differential equations for application to a uniform square grid in a computational space; and means for solving the derived and transformed partial differential equations to determine the flow of the first fluid through, and ejection from, the channel.

[0014] Preferably, the first fluid is ink, the second fluid is air, and the channel comprises an inkjet nozzle that is part of a piezoelectric ink-jet head.

[0015] In accordance with further aspects of the invention, any of the above-described methods or steps thereof may be embodied in a program of instructions (e.g., software) which may be stored on, or conveyed to, a computer or other processor-controlled device for execution. Alternatively, any of the methods or steps thereof may be implemented using functionally equivalent hardware (e.g., application specific integrated circuit (ASIC), digital signal processing circuitry, etc.) or a combination of software and hardware.

[0016] Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In the drawings wherein like reference symbols refer to like parts:

[0018]FIG. 1 is a schematic block diagram showing the interrelationship of an equivalent circuit with a computational fluid dynamics simulation according to embodiments of the invention;

[0019]FIG. 2 shows a typical rectangular grid for inkjet simulation;

[0020]FIG. 3 illustrates a boundary-fitted quadrilateral grid for ink-jet simulation;

[0021]FIG. 4 illustrates the transformation of grid points in a rectangular computational space to a physical axi-symmetric space;

[0022]FIG. 5 is a graphical illustration of a typical ink-jet driving voltage with respect to time over one cycle;

[0023]FIG. 6 is a graphical illustration of a typical ink-jet inflow pressure with respect to time over one cycle;

[0024]FIG. 7a is a schematic diagram of the location of velocity field, pressure and level set components;

[0025]FIG. 7b is a schematic diagram of the location of velocity field and level set components;

[0026]FIG. 8 shows a uniform square grid in computational space;

[0027]FIG. 9 is a flow chart illustrating the numerical algorithm according to embodiments of the invention;

[0028]FIG. 10 is a sequence of images illustrating the ejection of a large ink droplet from an ink-jet printer; and

[0029]FIG. 11 is a block diagram illustrating an exemplary system which may be used to implement aspects of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0030] I. Introduction

[0031] The model of this invention includes a quadrilateral grid for finite-difference-based ink-jet simulation. An accompanying algorithm is designed to solve the coupled Navier-Stokes equations and level set equations for two-phase flows that have been newly developed on the quadrilateral grid.

[0032] Governing partial differential equations, including the viscosity term, the surface tension term, and the level set convection equation for two-phase flows, are derived on the quadrilateral grid. A discrete transformation (mapping) is constructed so that the partial differential equations derived on the quadrilateral grid in physical space are transferred to the uniform square grid in a computational space to enable finite-difference-based ink-jet simulation. Since the grid in the computational space is square, numerical finite difference differentiation can be easily done. Although the governing equations assume a more complicated form after the transformation, the ease with which the equations can be solved in the computational space more than offsets the increased complication. A stable and powerful numerical algorithm is developed to solve the derived and transferred equations. In particular, the derivatives of the velocities, pressure, and level set are calculated on the uniform square grid in computational space.

[0033] II. Level Set Formulation

[0034] A. Governing Equations

[0035] The governing equations for two-phase flows include the continuity equation (1) and the Navier-Stokes equations (2), which are set forth in the Appendix along with the other numbered equations referenced in the following discussion. In these equations, the rate of deformation tensor and the fluid velocity are respectively defined in equations (3). $\frac{D}{Dt} = {\frac{\partial}{\partial t} + \left( {u \cdot \nabla} \right)}$

[0036] is the Lagrangian time derivative, ρ the relative density, p the pressure, μ the relative dynamic viscosity, σ the surface tension coefficient, κ the curvature, δ the Dirac delta function, and φ the level set.

[0037] A level set formulation is used to define the interface between the two fluids, e.g., ink and air, and hence the relative density, relative dynamic viscosity, and curvature are all defined in terms of the level set φ as in equation (4).

[0038] Here, the level set function φ is initialized as the signed distance to the interface, i.e., the level set value is the shortest distance to the interface on the liquid side and is the negative of the shortest distance on the air side. The unit normal on the interface, drawn from fluid 2 into fluid 1, and the curvature of the interface can be expressed in terms of φ as in equation (5).

[0039] To make the governing equations dimensionless, the following definitions, as set forth in equation (6), are chosen. The primed quantities are dimensionless, and L,U, ρ₁,μ₁, are respectively the characteristic length, characteristic velocity, density of fluid 1, and dynamic viscosity of fluid 1. The characteristic velocity and characteristic length can be arbitrarily chosen, as they do not influence the result of simulation.

[0040] Substituting the relationships of equation (6) into equations (1) and (2), and dropping the primes, yields equations (7) and (8), where the relative density ratio ρ(φ), relative viscosity ratio μ(φ), Reynolds number Re, and Weber number We are defined by equations (9).

[0041] Since the interface moves with the fluid, the evolution of the level set is governed by equation (10).

[0042] Since equations (5), (7) and (8) are expressed in terms of the vector notation, they assume the same form in Cartesian coordinates and axi-symmetric coordinates.

[0043] B. Governing Equations on Quadrilateral Mesh

[0044] The primary interest here is in finite difference analysis in reasonably complex geometries, for which a rectangular grid may not work well. The focus is therefore a general quadrilateral grid formulation. This can be done by carefully transforming the viscosity and surface tension terms.

[0045] Consider a continuous transformation Φ which maps the grid points in a rectangular computational space Ξ=(ξ,η) to the physical axi-symmetric space X=(r,z) according to equation (11) and as shown in FIG. 4. The Jacobian and the transformation matrix are defined by equations (12), where g=2πr for the axi-symmetric coordinate system. For the convenience of future discussion, we also define the transformed convection velocity as in equation (13).

[0046] The above definitions for axi-symmetric coordinate systems can be easily extended to the two-dimensional Cartesian system by the substitution shown in equation (14).

[0047] The derivation of the governing equations on the computational space will now be described in the following sub-sections.

[0048] B.1. Pressure Gradient

[0049] The pressure gradient on the quadrilateral grid can be obtained by the chain rule as shown in equations (15).

[0050] B.2. Continuity Condition

[0051] The divergence-free continuity condition on the quadrilateral grid is shown in equation (16). To prove this, expand the right hand side as shown in equations (17).

[0052] B.3. Convection Term

[0053] By combining the transformations in equations (15) and (17), the convection term set forth in equation (18) is obtained. The convection term in the level set equation can be transformed similarly.

[0054] B.4. Viscosity Term

[0055] For the transformation of the viscosity term for two-phase flows, the identity set forth in equation (19) is needed. Noting the relationship in equation (20) yields equation (21).

[0056] The first term on the right hand side of equation (21) vanishes for single phase flows with constant viscosity. However, it plays an important role for two phase flows. In an axi-symmetric coordinate system, the Laplacian operator in the second term is as set forth in equation (22). By noting the relationships in equations (23) and (24), equation (25) is obtained. By combining equations (21) and (25) the viscosity term in computational space is obtained. The viscosity term is set forth in equation (26).

[0057] B.5. Curvature and Surface Tension

[0058] Given the relationship in equation (27), the surface tension term is shown in equation (28).

[0059] Combining equations (17) to (28), the governing equations on the quadrilateral grid are obtained. These governing equations are set forth in equation (29), where the viscosity terms are as given in equation (26).

[0060] It will be noted that equations (15) to (29) are derived for a quadrilateral grid in the axi-symmetric coordinate system; however, they can be used for two-dimensional flow problems if the last term in equation (25) is neglected and the substitution in equation (14) is used. Also, equation (25) can be checked by reducing the computational space Ξ=(ξ,η) to the physical space X=(r, z). For this case, the transformation matrix reduces to the identity matrix and the Jacobian to g. Furthermore, it should be noted that ∇_(Ξ) and ∇_(Ξ)• are “matrix operators” while ∇ and ∇• are vector operators. When a vector operator is put in front of a vector quantity, it not only “operates” on the magnitude of the vector quantity but also on the direction. Here, the matrix operators ∇_(Ξ) and ∇_(Ξ)• are applied to scalars or matrices, and hence the “direction” is not relevant.

[0061] C. Boundary Conditions

[0062] On solid walls it is assumed that the normal and tangential components of the velocity vanishes, although this assumption must be modified at the triple point. At both inflow and outflow, the formulation of this invention allows us to prescribe either the velocity (30) or the pressure (31) as boundary conditions. In equation (31), the symbol n denotes the unit normal to the inflow or outflow boundary. Time-dependent inflow conditions are provided by an equivalent circuit model which mimics the charge-driven mechanism which forces ink from the bath into the nozzle.

[0063] D. Contact Models

[0064] At the triple point, where air and ink meet at the solid wall, the slipping contact line model as presented in related application Ser. No. 10/105,138 referenced above is used.

[0065] E. Equivalent Circuit

[0066] In a piezo ink-jet print head, the formation of the ink droplet is controlled by a piezoelectric PZT actuator. Driven by the input voltage, the PZT pushes and then pulls the ink. To numerically simulate an ink-jet print head, a velocity or pressure at nozzle inflow must be specified. Various appropriate values of these parameters may be specified by the user before simulation, or such values may be the result of previous measurements taken at different voltages input to PZT, since this voltage value is known.

[0067] Another analytic tool that may be developed and used to obtain inflow pressures that may be used for simulation of the ink-jet print head is an equivalent circuit. Such an equivalent circuit determines inflow pressure based on input voltage and ink flow rate. For example, the ink flow rate and pressure can be taken as independent variables. Each component of the ink-jet print head, such as the nozzle, pressure chamber, vibration plate, PZT actuator, and ink cartridge is expressed in terms of the acoustics inertance, compliance, and acoustics resistance. These acoustics elements are finally transferred to their equivalent inductance, capacitance, and electric resistance to form an equivalent circuit. By solving the equivalent circuit and the flow equations in term a real ink-jet head can be simulated. Other suitable methods may also be used to obtain inflow pressure values that relate to the PZT input voltage.

[0068] A typical driving voltage pattern and a typical inflow pressure are as shown in FIGS. 5 and 6. The driving voltage is such that the ink is first pulled back, pushed and fired, and then pulled back to get ready for the next discharge. The inflow pressure shown in FIG. 6 reflects the reaction of a typical nozzle-ink channel-PZT-cartridge system to the applied voltage. The pressure pattern contains several high frequency signals. The biggest one is basically the fundamental natural frequency of the system, which is five to six times higher than the driving voltage frequency in this case. The small oscillations are probably related to the natural frequencies of the components in the system.

[0069] III. Numerical Algorithms: Quadrilateral Grids

[0070] The numerical algorithm is now formulated on the quadrilateral grids. In the following, the superscript n (or n+1) denotes the time step, i.e., equation (32), and so on.

[0071] Given quantities u^(n),p^(n),φ^(n), the purpose of the algorithm is to obtain u^(n+1), p^(n+1), φ^(n+1) which satisfy the condition of incompressibility. The explicit algorithm described herein is first-order accurate in time and second-order accurate in space.

[0072] A. Smearing of the Interface

[0073] Because of the numerical difficulty caused by the Dirac delta function and by the abrupt change of the density and viscosity across the interface, we have to replace the Heaviside unit step and Dirac delta functions with smoothed ones, i.e., to smear the interface a little bit. The Heaviside function is redefined by equation (33). By the relation between the Dirac delta and the Heaviside functions in (34), we can easily obtain the smoothed Dirac delta function.

[0074] The parameter ε is usually chosen to be proportional to the average size of cells as set forth in (35), where Δx is the average size of the quadrilateral cells. We usually choose an α between 1.7 and 2.5.

[0075] B. Temporal Discretization

[0076] B.1. Level Set Update

[0077] The level set is updated first by equation (36). The time-centered advection term [{overscore (u)}·∇_(Ξ)φ]^(n+1/2) is evaluated using an explicit predictor-corrector scheme that requires only the available data at t^(n). The detail will be explained in the next sub-section. Once φ^(n+1) is obtained, φ^(n+1/2) is computed by equation (37).

[0078] B.2. Explicit Algorithm for Navier-Stokes Equations

[0079] In previous work, temporal discretization has been constructed as explicit for the advection term and semi-implicit for the viscosity term. The advantage of the semi-implicity is the second-order accuracy in time. The expense is that one needs to solve an extra non-symmetric linear system in each time step. In this invention, an explicit temporal discretization is applied to the viscosity term to reduce the CPU time, as set forth in equation (38). Using the definition of equation (39), the time-discretized Navier-Stokes equations can be written as set forth in equation (40).

[0080] We apply a second-order explicit Godunov scheme for the advection term and the central difference for the viscosity term in equation (39). They will be explained later. It is noticeable that the time-centered level set φ^(n+1/2) and the velocity u^(n) for the evaluation of the (viscosity term)^(n) is used. The determination of u^(*) needs only field quantities at time step n.

[0081] Since the finite-element projection is used, for which the special quadrilateral formulation (40) is unnecessary, the corresponding equation in the physical grid is written as in equation (41).

[0082] B.3. Projection for u^(n+1)

[0083] To satisfy the incompressibility condition for time step n+1 the divergence operator is applied to both sides of equation (41). Since ∇·u_(n+1), we have projection equation (42) which is elliptic. It reduces to a Poisson's equation if the density ratio ρ(φ^(n+1/2)) is a constant. The finite element formulation, shown in equation (43) where Γ₁ denotes all the boundary with given inflow or outflow velocity u^(BC), is used to facilitate implementation. It can be seen by the divergence theory, that the implied boundary condition at Γ₁ is as shown in equation (44). It is noticeable that the second term at the right hand side of (43) vanishes if only boundary pressures are given at the inflow and outflow.

[0084] After the pressure p^(n+1) is solved from equation (43), the velocity field u^(n+1) can be obtained by equation (40).

[0085] B.4. Re-Initialization of the Level Set

[0086] To correctly capture the interface and accurately calculate the surface tension, the level set needs to be maintained as a signed distance function to the interface. However, if the level set is updated by equation (7), it will not remain as such. Therefore, instead, the simulation is periodically stopped and a new level set function φ is recreated which is the signed distance function, i.e., |∇φ|=1, without changing the zero level set of the original level set function.

[0087] The need to do so in level set calculations has been previously recognized, as has re-initialization. A direct and simple method for re-initialization is to first find the interface (the zero level set) using a contour plotter and then recalculate the signed distance from each cell to the interface. Another simple re-initialization choice is to solve the crossing time problem as set forth in equation (45), where F is a given normal velocity. It is noticeable that t′ has been used in equation (45) to emphasize that it is a pseudo time variable and the equation is solved solely for the purpose of re-initialization. With F=1, flow the interface forward and backward in time and calculate the time t′ at which the level set function changes sign for each cell. The crossing times (both positive and negative) are equal to the signed distances.

[0088] Either of these two simple methods are suitable for use with the present invention. Both have been tried with no noticeable difference in simulation results. Other re-initialization techniques which may be used can be found in the text: “Level Set Methods and Fast Marching Methods” by James A. Sethian, second edition, Cambridge University Press, 1999.

[0089] C. Spatial Discretization

[0090] C.1. The Quadrilateral Grid

[0091] Referring to FIGS. 7a and 7 b, the velocity components u_(i,j) ^(n) and the level set φ_(i,j) ^(n) are placed at cell centers, and the pressure p_(i,j) ^(n) is placed at grid points. The time-centered edge velocities and the level set “predictors,” like u_(i+1/2,j) ^(n+1/2), φ_(i+1/2,j) ^(n+1/2), and so on, are at the middle point of each edge. How to obtain these time-centered edge quantities will be explained later in this sub-section.

[0092] The transformation X=Φ(Ξ) is such that the grid in the computational space is composed of unit squares, i.e., the grid in the computational space has Δξ=Δη=1. The boundary-fitted quadrilateral grid and the nozzle wall in FIG. 3 are mapped to the uniform computational grid and the rectangular hatched area in FIG. 8.

[0093] The coordinates of the cell centers in the physical space are as shown in equation (46). Differences of the grid points are used to define the elements of the transformation matrix at cell centers. See equation (47) for example.

[0094] Note that only the local definition of the transformation (or mapping) is needed in the algorithm. The existence or the exact form of the global transformation X=Φ(Ξ) is not important.

[0095] C.2. The Advection Term

[0096] The algorithm for the advection terms is based on the unsplit Godunov method as introduced in John B. Bell, Phillip Colella, and Harland M. Glaz, “A Second-order Projection Method for the Incompressible Navier-Stokes Equations,” Journal of Computational Physics, 85(2), pp. 257-283, 1989, for one fluid incompressible flows and extended by John B. Bell and Daniel L. Marcus, “A Second-order Projection Method for Variable-Density Flows,” Journal of Computational Physics, 101, pp. 334-348, 1992, for two-phase (two constant densities) flows. It is a cell-centered predictor-corrector scheme.

[0097] To evaluate the advection terms (the corrector step), equations (48) and (49) are used. In these equations the edge velocities and edge level sets are obtained by Taylor's expansion in space and time. The time derivative u_(t) ^(n) and φ_(t) ^(n) are substituted by the Navier-Stokes equations and the level set convection equation. Extrapolation is done from both sides of the edge and then the Godunov type upwinding is applied to decide which extrapolation to use. How to obtain u_(i+1/2,j) ^(n+1/2) is now explained. The other time-centered edge values may be derived in a similar way. Extrapolate from the left, yielding equation (50) where F_(i,j) ^(n) is as given in equation (51). Extrapolate from the right yielding equation (52).

[0098] The monotonicity-limited central difference is used for the evaluation of the normal slopes, which is u_(ξ,i,j) ^(n) in this case. The limiting is done on each component of the velocity at t^(n) separately. The tranverse derivative term $\left( {\overset{\_}{v}u_{\eta}} \right)_{i,j}^{n}$

[0099] is evaluated by the simple upwind scheme. The detailed formula is given later in this application.

[0100] The next step is the Godunov upwinding. The advective velocities are decided by equations (53) and (54). These edge advective velocities are, in general, not divergence-free. An intermediate MAC projection is needed to make all the normal edge velocities divergence-free. Suppose q is a function which is smooth enough and u^(e) are the edge velocities obtained as in equations (50)-(54). It is desired that equation (55) be divergence-free. Taking the divergence of equation (55), yields equation (56). In a quadrilateral grid the above MAC projection equation is written as equation (57). The boundary conditions for q are similar to those for the pressure. At the outflow q=0 is used. At the inflow, the boundary condition (58) is used.

[0101] After q is solved, the edge advective velocities are replaced by equation (59).

[0102] Evaluation of the Normal Derivatives

[0103] The normal derivatives in equations (50) and (52) are evaluated using the monotonicity-limited central difference. The central, forward, and backward differences are first calculated as shown in equation (60). These values are then used to define the limiting slope as set forth in equation (61). The second-order limited slope is given in equation (62).

[0104] Evaluation of the Tangential Derivatives

[0105] In the Taylor extrapolation of equations (50) and (52), the derivatives normal to the edge are computed using the monotonicity-limited central difference scheme. However, for the sake of stability, the tangential derivative should be computed using some upwind schemes. One way of doing that is shown in equation (63).

[0106] C.3. The Viscosity Term

[0107] Because the discretization of the first part of the viscosity term in equation (21) is straightforward, only the discretization of the Laplacian term is shown. The Laplacian in the computational coordinates has the form shown in equation (64), where α,β, and γ are defined as set forth in equations (65). Each term in equation (64) is discretized using standard central differences with coefficients computed by averaging elements of the transformation matrix.

[0108] D. Constraint on Time Step

[0109] Since the time integration scheme is second-order explicit for the convection term and first-order explicit for viscosity, the constraint on time step Δt is determined by the CFL condition, surface tension, viscosity, and total acceleration, as shown in equation (66), where h=min(Δr,Δz) and F is defined in equation (51).

[0110] E. The Flowchart

[0111] As shown by the flowchart in FIG. 9, the numerical algorithm is basically sequential. The code first reads the nozzle geometry (step 901) and also reads control parameters like tend (end time of the simulation), α (the extent of interface smearing), ifq_reini (how often the level set should be re-initialized) (step 902). With the given nozzle geometry, the code creates a body-fitted quadrilateral grid like in FIG. 3 (step 903), and calculates the transformation matrix T and the Jacobian J using equation (12) (step 904). The time and the number of the current time step are set to zero and the initial fluid velocity is set to zero everywhere (step 905). With the given smearing parameter (α), the interface thickness is set using equation (35). The level set φ⁰ is then initialized by assuming the initial ink-air interface is flat (step 907).

[0112] Now the time loop starts by checking whether t<tend (step 908). If so, the time step Δt is determined by equation (66) to ensure the stability of the code (step 909). The time is updated (step 910). The time step and the ink flow rate (the initial flow rate is zero) are then passed to an equivalent circuit or like analytic tool, which calculates the inflow pressure for the current time step (step 911). After receiving the inflow velocity from the equivalent circuit, the CFD code goes ahead to solve the partial differential equations. The level set is first updated using equation (36) and, for every ifq_reini time steps, is also re-distanced (steps 913 and 914). The new fluid viscosity and density are calculated using the new level set values (step 915). The velocity predictor equation (39) is then calculated (step 916). Finally, the predictor velocity is projected into the divergence-free space to get the new pressure and incompressible velocity fields (step 917). The last things to do in the loop are calculating the ink flow rate (step 918) and updating the number of the time step (step 919).

[0113] IV. Ink-Jet Simulation

[0114] As an example of ink-jet simulation, consider a typical nozzle as shown in FIG. 1. The diameter is, for example, 25 microns at the opening and 51.4 microns at the bottom. In the illustrated embodiment, the length of the nozzle opening portion (i.e., where the diameter is 25 microns) is 25 microns, the length of tapered section is 55 microns, and the length of the bottom portion is 7.5 microns.

[0115] The inflow pressure is given by an equivalent circuit which simulates the effect of the ink cartridge, supply channel, vibration plate, PZT actuator, applied voltage, and the ink inside the channel and cartridge. In this example, the input voltage is given in FIG. 5, the corresponding inflow pressure is as shown in FIG. 6, and the outflow pressure at the top of the solution domain is set to zero.

[0116] In this example, the solution domain was chosen to be {(r,z)|0≦r≦31.25 μm, 0≦z≦380 μm}. The contact angle was assumed to be 90° all the time and the initial meniscus is assumed to be flat and 2.6 microns under the nozzle opening. An interface smearing α=2 was used in the code.

[0117] For the purpose of normalization, the nozzle opening diameter (25 microns) is selected to be the length scale and 6 m/s is selected to be the velocity scale. The normalization solution domain is hence {(r,z)|0≦r≦1.25 μm, 0≦z≦15.2 μm}. Since the density, viscosity, and surface tension of ink are approximately as given in equations (67), the non-dimensional parameters of equations (68) are obtained. Simulation results are shown in FIG. 10. The ink droplet is pinched off inside the nozzle after t=30 μs. Its tail exits the nozzle opening at t=35 μs. The droplet then separates into a major droplet and satellites.

[0118] V. Implementations and Effects

[0119] The main features of the simulation model, namely, a discrete transformation for transferring a quadrilateral grid in the physical space to a uniform square grid in the computational space to enable finite-difference-based ink-jet simulation; derivation of governing partial differential equations, including derivation of the viscosity term, the surface tension term, and the level set convection equation for two-phase flows, on the quadrilateral grid; transformation of those equations for application on the uniform square grid; and development of a stable and powerful numerical algorithm to solve the derived and transformed equations, provide a more accurate way to simulate and analyze ink ejection that overcomes the previously encountered problems and enable more precise control of ink droplet size and shape.

[0120] Having described the details of the invention, an exemplary system 100 which may be used to implement one or more aspects of the present invention will now be described with reference to FIG. 11. As illustrated in FIG. 11, the system includes a central processing unit (CPU) 101 that provides computing resources and controls the computer. CPU 101 may be implemented with a microprocessor or the like, and may also include a graphics processor and/or a floating point coprocessor for mathematical computations. System 100 further includes system memory 102 which may be in the form of random-access memory (RAM) and read-only memory (ROM).

[0121] A number of controllers and peripheral devices are also provided, as shown in FIG. 11. Input controller 103 represents an interface to various input devices 104, such as a keyboard, mouse or stylus. There is also a controller 105 which communicates with a scanner 106. A storage controller 107 interfaces with one or more storage devices 108 each of which includes a storage medium such as magnetic tape or disk, or an optical medium that may be used to record programs of instructions for operating systems, utilities and applications which may include embodiments of programs that implement various aspects of the present invention. Storage device(s) 108 may also be used to store processed or data to be processed in accordance with the invention. A display controller 109 provides an interface to a display device 111 which may be a cathode ray tube (CRT) or thin film transistor (TFT) display. A printer controller 112 is also provided for communicating with a printer 113. A communications controller 114 interfaces with one or more communication devices 115 which enables system 100 to connect to remote devices through any of a variety of networks including the Internet, a local area network (LAN), a wide area network (WAN), or through any suitable electromagnetic carrier signals including infrared signals.

[0122] In the illustrated system, all major system components connect to bus 116 which may represent more than one physical bus. However, various system components may or may not be in physical proximity to one another. For example, input data and/or output data may be remotely transmitted from one physical location to another. Also, programs that implement various aspects of this invention may be accessed from a remote location (e.g., a server) over a network. Such data and/or programs may be conveyed through any of a variety of machine-readable medium including magnetic tape or disk or optical disc, network signals, or any other suitable electromagnetic carrier signals including infrared signals.

[0123] The present invention may be conveniently implemented with software. However, alternative implementations are certainly possible, including a hardware and/or a software/hardware implementation. Any hardware-implemented functions may be realized using ASIC(s), digital signal processing circuitry, or the like. Accordingly, the “means” terms in the claims are intended to cover both software and hardware implementations. Similarly, the term “machine-readable medium” as used herein includes software, hardware having a program of instructions hardwired thereon, or combination thereof. With these implementation alternatives in mind, it is to be understood that the figures and accompanying description provide the functional information one skilled in the art would require to write program code (i.e., software) or to fabricate circuits (i.e., hardware) to perform the processing required.

[0124] While the invention has been described in conjunction with several specific embodiments, further alternatives, modifications, variations and applications will be apparent to those skilled in the art in light of the foregoing description. Thus, the invention described herein is intended to embrace all such alternatives, modifications, variations and applications as may fall within the spirit and scope of the appended claims. $\begin{matrix} {{\nabla{\cdot u}} = 0.} & (1) \\ {{{\rho (\varphi)}\frac{Du}{Dt}} = {{{- {\nabla p}}{\nabla{\cdot \left( {2{\mu (\varphi)}} \right)}}} - {{{\sigma\kappa}(\varphi)}{\delta (\varphi)}{{\nabla\varphi}.}}}} & (2) \\ { = {\frac{1}{2}\left\lbrack {{{\nabla u} + \left( {\nabla\quad u} \right)^{T}},{u = {{u\quad e_{1}} + {\upsilon \quad {e_{2}.}}}}} \right.}} & (3) \\ {{\varphi \left( {x,y,t} \right)}\left\{ {\begin{matrix} {< 0} & {if} & {\left( {x,y} \right) \in {{fluid}\quad {\# 2}\quad ({air})}} \\ {= 0} & {if} & {\left( {x,y} \right) \in {interface}} \\ {> 0} & {if} & {\left( {x,y} \right) \in {{fluid}\quad {\# 1}\quad ({ink})}} \end{matrix}.} \right.} & (4) \\ {{n = {\frac{\nabla\varphi}{{\nabla\varphi}}_{\varphi = 0}}},{\kappa = {{\nabla{\cdot \left( \frac{\nabla\varphi}{{\nabla\varphi}} \right)}}_{\varphi = 0}.}}} & (5) \\ {{x = {Lx}^{\prime}},{y = {Ly}^{\prime}},{u = {Uu}^{\prime}},{t = {\frac{L}{U}t^{\prime}}},{p = {\rho_{1}U^{2}p^{\prime}}},{\rho = {\rho_{1}\rho^{\prime}}},{\mu = {\mu_{1}{\mu^{\prime}.}}}} & (6) \\ {{\nabla{\cdot u}} = 0.} & (7) \\ {\frac{Du}{Dt} = {{{- \frac{1}{\rho (\varphi)}}{\nabla p}} + {\frac{1}{\rho\varphi Re}{\nabla{\cdot \left( {2{\mu (\varphi)}} \right)}}} - {\frac{1}{{\rho (\varphi)}{We}}{\kappa (\varphi)}{\delta (\varphi)}{{\nabla\varphi}.}}}} & (8) \\ \begin{matrix} {{\rho (\varphi)} = \left\{ {\begin{matrix} 1 & {{{if}\quad \varphi} \geq 0} \\ {\rho_{2}/\rho_{1}} & {{{if}\quad \varphi} > 0} \end{matrix},} \right.} \\ {{\mu (\varphi)} = \left\{ {\begin{matrix} 1 & {{{if}\quad \varphi} \geq 0} \\ {{\mu_{2}/}\mu_{1}} & {{{if}\quad \varphi} < 0} \end{matrix},} \right.} \\ {{{Re} = \frac{\rho_{1}U\quad L}{\mu_{1}}},} \\ {{We} = {\frac{\rho_{1}U^{2}L}{\sigma}.}} \end{matrix} & (9) \\ {{\frac{\partial\varphi}{\partial t} + {u \cdot {\nabla\varphi}}} = 0.} & (10) \\ {X = {{\Phi (\Xi)}.}} & (11) \\ {{J = {{g\quad \det {\nabla_{\Xi}\Phi}} = {g\quad {\det \begin{pmatrix} r_{\xi} & r_{\eta} \\ z_{\xi} & z_{\eta} \end{pmatrix}}}}},{T = {{g^{- 1}{J\left\lbrack {\nabla_{\Xi}\Phi} \right\rbrack}^{- 1}} = {\begin{pmatrix} z_{\eta} & {- r_{\eta}} \\ {- z_{\xi}} & r_{\xi} \end{pmatrix}.}}}} & (12) \\ {\overset{\_}{u} = {gTu}} & (13) \\ {{r->x},{z->y},{g->1.}} & (14) \\ \begin{matrix} {{\nabla\quad p} = {\begin{pmatrix} p_{r} \\ p_{z} \end{pmatrix} = \begin{pmatrix} {{p_{\xi}\xi_{r}} + {p_{\eta}\eta_{r}}} \\ {{p_{\xi}\xi_{z}} + {p_{\eta}\eta_{z}}} \end{pmatrix}}} \\ {= {\begin{pmatrix} \xi_{r} & \eta_{r} \\ \xi_{z} & \eta_{z} \end{pmatrix}\begin{pmatrix} p_{\xi} \\ p_{\eta} \end{pmatrix}}} \\ {= {{{gJ}^{- 1}\begin{pmatrix} z_{\eta} & {{- z}\quad \xi} \\ {- r_{\eta}} & r_{\xi} \end{pmatrix}}\begin{pmatrix} p_{\xi} \\ p_{\eta} \end{pmatrix}}} \\ {= {{gJ}^{- 1}T^{T}{{\nabla_{\Xi}p}.}}} \end{matrix} & (15) \\ {{\nabla{\cdot u}} = {J^{- 1}{\nabla_{\Xi}{\cdot {\overset{\_}{u}.}}}}} & (16) \\ \begin{matrix} {{\nabla_{\Xi}{\cdot \overset{\_}{u}}} = {\nabla_{\Xi}{\cdot \left\lbrack {{g\begin{pmatrix} z_{\eta} & {- r_{\eta}} \\ {- z_{\xi}} & r_{\xi} \end{pmatrix}}\begin{pmatrix} u \\ \upsilon \end{pmatrix}} \right\rbrack}}} \\ {{= g},_{\xi}{\left( {{uz}_{\eta} - {\upsilon \quad r_{\eta}}} \right) + {g\left( {{u\quad z_{n}} - {\upsilon \quad r_{\eta}}} \right)}},_{\xi}{+ g},_{\eta}{\left( {{\upsilon \quad r_{\xi}} - {u\quad z_{\xi}}} \right) +}} \\ {{{g\left( {{\upsilon \quad r_{\xi}} - {u\quad z_{\xi}}} \right)},_{\eta}}} \\ {= {2{\pi \left\lbrack {{\left( {{r_{\xi}z_{\eta}} - {r_{\eta}z_{\xi}}} \right)u} + {r\left( {{u_{\xi}z_{\eta}} - {u_{\eta}z_{\xi}} - {\upsilon_{\xi}r_{\eta}} + {\upsilon_{\eta \quad}r_{\xi \quad}}} \right)}} \right\rbrack}}} \\ {= {2\pi \left\{ {{\left( {{r_{\xi}z_{\eta}} - {r_{\eta}z_{\xi}}} \right)u} + {r\left\lbrack {{z_{\eta}\left( {{u_{r}r_{\xi}} + {u_{z}z_{\xi}}} \right)} - {z_{\xi}\left( {{u_{r}r_{\eta}} + {u_{z}z_{\eta}}} \right)} -} \right.}} \right.}} \\ \left. \left. {{r_{\eta}\left( {{\upsilon_{r}r_{\xi}} + {\upsilon_{z}z_{\xi}}} \right)} + {r_{\xi}\left( {{\upsilon_{r}r_{\eta}} + {\upsilon_{z}z_{\eta}}} \right)}} \right\rbrack \right\} \\ {= {2{\pi \left\lbrack {{\left( {{r_{\xi}z_{\eta}} - {r_{\eta}z_{\xi}}} \right)u} + {{r\left( {{r_{\xi}z_{\eta}} - {r_{\eta}z_{\xi}}} \right)}\left( {\upsilon_{r} + \upsilon_{z}} \right)}} \right\rbrack}}} \\ {= {J{\nabla{\cdot {u.}}}}} \end{matrix} & (17) \\ \begin{matrix} {{\left( {u \cdot \nabla} \right)u} = {\left\lbrack {u \cdot \left( {{gJ}^{- 1}T^{T}\nabla_{\Xi}} \right)} \right\rbrack u}} \\ {= {{{J^{- 1}\left\lbrack {({gTu}) \cdot \nabla_{\xi}} \right\rbrack}u} = {{J^{- 1}\left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right)}{u.}}}} \end{matrix} & (18) \\ {{\nabla{\cdot \left( {2{\mu (\varphi)}} \right)}} = {{\left\lbrack {\nabla\quad {\mu (\varphi)}} \right\rbrack \cdot \left\lbrack {\left( {\nabla\quad u} \right) + \left( {\nabla\quad u} \right)^{T}} \right\rbrack} + {{\mu (\varphi)}{\nabla{\cdot {\left\lbrack {\left( {\nabla\quad u} \right) + \left( {\nabla u} \right)^{T}} \right\rbrack.}}}}}} & (19) \\ {{\nabla{\cdot \left\lbrack \left( {\nabla\quad u} \right)^{T} \right\rbrack}} = 0.} & (20) \\ {{\frac{1}{{\rho (\varphi)}{Re}}{\nabla{\cdot \left\lbrack {2{\mu (\varphi)}} \right\rbrack}}} = {{{\frac{g}{J\quad {\rho (\varphi)}\quad {Re}}\left\lbrack {T^{T}{\nabla_{\Xi}{\mu (\varphi)}}} \right\rbrack} \cdot \left\lbrack {{{gJ}^{- 1}T^{T}{\nabla_{\Xi}u}} + \left( {g\quad J^{- 1}T^{T}{\nabla_{\Xi}u}} \right)^{T}} \right\rbrack} + {\frac{\mu (\varphi)}{{\rho (\varphi)}{Re}}{{\nabla^{2}u}.}}}} & (21) \\ {{\nabla{\cdot {\nabla\quad u}}} = {{\frac{1}{r}{\begin{pmatrix} \frac{\partial}{\partial r} \\ \frac{\partial}{\partial z} \end{pmatrix} \cdot \left\{ {r\begin{pmatrix} u_{r} & \upsilon_{r} \\ u_{z} & \upsilon_{z} \end{pmatrix}} \right\}}} + {\begin{pmatrix} {- \frac{u}{r^{2}}} \\ 0 \end{pmatrix}.}}} & (22) \\ \begin{matrix} {\begin{pmatrix} \upsilon_{r} & \upsilon_{r} \\ u_{r} & \upsilon_{z} \end{pmatrix} = {\begin{pmatrix} \xi_{r} & \eta_{r} \\ \xi_{z} & \eta_{z} \end{pmatrix}\begin{pmatrix} u_{\xi} & \upsilon_{\xi} \\ u_{\eta} & \upsilon_{\eta} \end{pmatrix}}} \\ {= {{gJ}^{- 1}{{T^{T}\begin{pmatrix} u_{\xi} & \upsilon_{\xi} \\ u_{\eta} & \upsilon_{\eta} \end{pmatrix}}.}}} \end{matrix} & (23) \\ \begin{matrix} {{\begin{pmatrix} \frac{\partial}{\partial r} \\ \frac{\partial}{\partial z} \end{pmatrix} \cdot \begin{pmatrix} \alpha & \beta \\ \gamma & \delta \end{pmatrix}} = {{{gJ}^{- 1}\begin{pmatrix} \frac{\partial}{\partial\xi} \\ \frac{\partial}{\partial\eta} \end{pmatrix}} \cdot \left\{ {\begin{pmatrix} z_{\eta} & {- r_{\eta}} \\ {- z_{\xi}} & r_{\xi} \end{pmatrix}\begin{pmatrix} \alpha & \beta \\ \gamma & \delta \end{pmatrix}} \right\}}} \\ {= {{gJ}^{- 1}{\nabla_{\Xi}{\cdot {\left\{ {T\begin{pmatrix} \alpha & \beta \\ \gamma & \delta \end{pmatrix}} \right\}.}}}}} \end{matrix} & (24) \\ {{\frac{\mu (\varphi)}{{\rho (\varphi)}{Re}}{\nabla{\cdot {\nabla\quad u}}}} = {{\frac{\mu (\varphi)}{J\quad {\rho (\varphi)}{Re}}{\nabla_{\Xi}{\cdot \left\{ {g^{2}J^{- 1}{TT}^{T}{\nabla_{\Xi}u}} \right\}}}} + {\frac{\mu (\varphi)}{{\rho (\varphi)}{Re}}{\begin{pmatrix} {- \frac{u}{r^{2}}} \\ 0 \end{pmatrix}.}}}} & (25) \\ {{\frac{1}{{\rho (\varphi)}{Re}}{\nabla{\cdot \left\lbrack {2{\mu (\varphi)}} \right\rbrack}}} = {{{\frac{g}{J\quad {\rho (\varphi)}{Re}}\left\lbrack {T^{T}{\nabla_{\Xi}{\mu (\varphi)}}} \right\rbrack} \cdot \left\lbrack {{gJ}^{- 1}{TT}^{T}{\nabla_{\Xi}u}} \right\}} + {\frac{\mu (\varphi)}{{\rho (\varphi)}{Re}}{\begin{pmatrix} {- \frac{u}{r^{2}}} \\ 0 \end{pmatrix}.}}}} & (26) \\ \begin{matrix} {{\kappa (\varphi)} = {\nabla{\cdot \left( \frac{\nabla\varphi}{{\nabla\varphi}} \right)}}} \\ {= {J^{- 1}{\nabla_{\Xi}{\cdot {\left( {{gT}\frac{T^{T}{\nabla_{\Xi}\varphi}}{{T^{T}{\nabla_{\Xi}\varphi}}}} \right).}}}}} \end{matrix} & (27) \\ {{- \frac{g\quad {\delta (\varphi)}}{J^{2}{\rho (\varphi)}{We}}}{\nabla_{\Xi}{\cdot \left( {{gT}\frac{T^{T}{\nabla_{\Xi}\varphi}}{{T^{T}{\nabla_{\Xi}\varphi}}}} \right)}}{\left( {T^{T}{\nabla_{\Xi}\varphi}} \right).}} & (28) \\ {\begin{matrix} {{\frac{\partial u}{\partial t} + {{J^{- 1}\left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right)}u}} = {{{- \frac{1}{{\rho (\varphi)}J}}{gT}^{T}{\nabla_{\Xi}p}} + {\text{(}\text{Viscosity}\text{term}\text{)}} -}} \\ {{{{\frac{1}{Fr}e_{z}} - {\frac{g\quad {\delta (\varphi)}}{J^{2}{\rho (\varphi)}{We}}{\nabla_{\Xi}{\cdot \left( {{gT}\frac{T^{T}{\nabla_{\Xi}\varphi}}{{T^{T}{\nabla_{\Xi}\varphi}}}} \right)}}\left( {T^{T}{\nabla_{\Xi}\varphi}} \right)}},}} \end{matrix}{{{\nabla_{\Xi}{\cdot \overset{\_}{u}}} = 0},{{\frac{\partial\varphi}{\partial t} + {J^{- 1}{\overset{\_}{u} \cdot {\nabla_{\Xi}\varphi}}}} = 0.}}} & (29) \\ {u = u^{BC}} & (30) \\ {{p = p^{BC}},{\frac{\partial u}{\partial n} = 0.}} & (31) \\ {u^{n} = {u\left( {t = {n\quad \Delta \quad t}} \right)}} & (32) \\ {{H(\varphi)} = \left\{ {\begin{matrix} 0 & {if} & {\varphi < {- \varepsilon}} \\ {\frac{1}{2}\left\lbrack {1 + \frac{\varphi}{\varepsilon} + {\frac{1}{\pi}{\sin \left( {{\pi\varphi}/\varepsilon} \right)}}} \right\rbrack} & {if} & {{\varphi } \leq \varepsilon} \\ 1 & {if} & {\varphi > \varepsilon} \end{matrix}.} \right.} & (33) \\ {{\delta (\varphi)} = \frac{{H(\varphi)}}{\varphi}} & (34) \\ {\varepsilon = {\alpha \quad \Delta \quad {x.}}} & (35) \\ {\varphi^{n + 1} = {\varphi^{n} - {\frac{\Delta \quad t}{J}\left\lbrack {\overset{\_}{u} \cdot {\nabla_{\Xi}\varphi}} \right\rbrack}^{n + {1/2}}}} & (36) \\ {\varphi^{n + {1/2}} = {\frac{1}{2}{\left( {\varphi^{n} + \varphi^{n + 1}} \right).}}} & (37) \\ {{\frac{u^{n + 1} - u^{n}}{\Delta \quad t} + {J^{- 1}\left\lbrack {\left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right)u} \right\rbrack}^{n + {1/2}}} = {{{- \frac{g}{{\rho \left( \varphi^{n + {1/2}} \right)}J}}T^{T}{\nabla_{\Xi}p^{n + 1}}} + \left( {{Viscosity}\quad {term}} \right)^{n} + \left( {{Surface}\quad {tension}} \right)^{n + {1/2}} - {\frac{1}{Fr}{e_{2}.}}}} & (38) \\ {u^{*} = {u^{n} + {\Delta \quad t{\left\{ {{- {J^{- 1}\left\lbrack {\left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right)u} \right\rbrack}^{n + {1/2}}} + {\left( {{Viscosity}\quad {term}} \right)^{n}\left( {{Surface}\quad {tension}} \right)^{n + {1/2}}} - {\frac{1}{Fr}e_{2}}} \right\}.}}}} & (39) \\ {u^{n + 1} = {u^{*} - {\frac{g\quad \Delta \quad t}{{\rho \left( \varphi^{n + {1/2}} \right)}J}T^{T}{{\nabla_{\Xi}p^{n + 1}}.}}}} & (40) \\ {u^{n + 1} = {u^{*} - {\frac{\Delta \quad t}{\rho \left( \varphi^{n + {1/2}} \right)}{{\nabla p^{n + 1}}.}}}} & (41) \\ {{\nabla{\cdot u^{*}}} = {\nabla{\cdot {\left( {\frac{\nabla\quad t}{\rho \left( \varphi^{n + {1/2}} \right)}{\nabla p^{n + 1}}} \right).}}}} & (42) \\ {{\int_{\Omega}^{\quad}{{u^{*} \cdot {\nabla\psi}}{x}}} = {{\int_{\Omega}^{\quad}{\frac{\Delta \quad t}{\rho \left( \varphi^{n + {1/2}} \right)}{{\nabla p^{n + 1}} \cdot {\nabla\psi}}{x}}} + {\int_{\Gamma_{1}}^{\quad}{\psi \quad {u^{BC} \cdot n}{{S}.}}}}} & (43) \\ {{\frac{\Delta \quad t}{\rho \left( \varphi^{n + {1/2}} \right)}\frac{\partial p^{n + 1}}{\partial n}} = {\left( {u^{*} - u^{BC}} \right) \cdot n}} & (44) \\ {{\varphi_{t^{\prime}} + {F{\varphi }}} = 0} & (45) \\ {\frac{1}{4}\left( {X_{{i - 1},{j - 1}} + X_{{i - 1},j} + X_{i,{j - 1}} + X_{i,j}} \right)} & (46) \\ {\left( X_{\xi} \right)_{i,j} = {\frac{1}{2}{\left( {X_{i,j} - X_{{i - 1},j} + X_{i,{j - 1}} - X_{{i - 1},{j - 1}}} \right).}}} & (47) \\ \begin{matrix} {\left\lbrack \left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right) \right\rbrack_{i,j}^{n + {1/2}} = {{\frac{{\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}} + {\overset{\_}{u}}_{{i - {1/2}},j}^{n + {1/2}}}{2}\left( {u_{{i + {1/2}},j}^{n + {1/2}} - u_{{i - {1/2}},j}^{n + {1/2}}} \right)} +}} \\ {{{\frac{{\overset{\_}{\upsilon}}_{i,{j + {1/2}}}^{n + {1/2}} + {\overset{\_}{\upsilon}}_{{i - {1/2}},j}^{n + {1/2}}}{2}\left( {u_{i,{j + {1/2}}}^{n + {1/2}} - u_{i,{j - {1/2}}}^{n + {1/2}}} \right)},}} \end{matrix} & (48) \\ \begin{matrix} {\left\lbrack \left( {\overset{\_}{u} \cdot \nabla_{\Xi}} \right) \right\rbrack_{i,j}^{n + {1/2}} = {{\frac{{\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}} + {\overset{\_}{u}}_{{i - {1/2}},j}^{n + {1/2}}}{2}\left( {\varphi_{{i + {1/2}},j}^{n + {1/2}} - \varphi_{{i - {1/2}},j}^{n + {1/2}}} \right)} +}} \\ {{\frac{{\overset{\_}{\upsilon}}_{i,{j + {1/2}}}^{n + {1/2}} + {\overset{\_}{\upsilon}}_{i,{j - {1/2}}}^{n + {1/2}}}{2}{\left( {\varphi_{i,{j + {1/2}}}^{n + {1/2}} - \varphi_{i,{j - {1/2}}}^{n + {1/2}}} \right).}}} \end{matrix} & (49) \\ \begin{matrix} {u_{{i + {1/2}},j}^{{n + {1/2}},L} = {u_{i,j}^{n} + {\frac{1}{2}u_{\xi,i,j}^{n}} + {\frac{\Delta \quad t}{2}u_{t,i,j}^{n}}}} \\ {= {u_{i,j}^{n} + {\left( {\frac{1}{2} - {\frac{\Delta \quad t}{2\quad J_{i,j}}{\overset{\_}{u}}_{i,j}^{n}}} \right)u_{\xi,i,j}^{n}} - {\frac{\Delta \quad t}{2\quad J_{i,j}}\left( {\overset{\_}{\upsilon}u_{n}} \right)_{i,j}^{n}} + {\frac{\Delta \quad t}{2}F_{i,j}^{n}}}} \end{matrix} & (50) \\ {F_{i,j}^{n} = {\left\{ {{{- \frac{g}{{\rho (\varphi)}J}}{\nabla_{\Xi}p}} + \left( {{Viscosity}\quad {term}} \right) + \left( {{Surface}\quad {tension}} \right) - {\frac{1}{Fr}e_{2}}} \right\}_{i,j}^{n}.}} & (51) \\ \begin{matrix} {u_{{i + {1/2}},j}^{{n + {1/2}},R} = {u_{{i + 1},j}^{n} + {\frac{1}{2}u_{\xi,{i + 1},j}^{n}} + {\frac{\Delta \quad t}{2}u_{t,{i + 1},j}^{n}}}} \\ {= {u_{{i + 1},j}^{n} + {\left( {\frac{1}{2} - {\frac{\Delta \quad t}{2\quad J_{{i + 1},j}}{\overset{\_}{u}}_{{i + 1},j}^{n}}} \right)u_{\xi,{i + 1},j}^{n}} -}} \\ {{{\frac{\Delta \quad t}{2\quad J_{{i + 1},j}}\left( {\overset{\_}{\upsilon}u_{\eta}} \right)_{{i + 1},j}^{n}} + {\frac{\Delta \quad t}{2}{F_{{i + 1},j}^{n}.}}}} \end{matrix} & (52) \\ {{\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}} = \left\{ \begin{matrix} {\overset{–}{u}}_{{i + {1/2}},j}^{{n + {1/2}},L} & {{if}\quad {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},L}} & > & 0 & {and} & {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},L} & + & {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},R} & > & 0 \\ {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},R} & {{if}\quad {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},R}} & < & 0 & {and} & {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},L} & + & {\overset{\_}{u}}_{{i + {1/2}},j}^{{n + {1/2}},R} & < & 0 \\ 0 & {otherwise} & \quad & \quad & \quad & \quad & \quad & \quad & \quad & \quad \end{matrix} \right.} & (53) \\ {{u_{{i + {1/2}},j}^{n + {1/2}}\left( {{or}\quad \varphi_{{i + {1/2}},j}^{n + {1/2}}} \right)} = \left\{ \begin{matrix} {u_{{i + {1/2}},j}^{{n + {1/2}},L}\left( {{or}\quad \varphi_{{i + {1/2}},j}^{{n + {1/2}},L}} \right)} & \quad & {{{if}\quad {\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}}} > 0} \\ {u_{{i + {1/2}},j}^{{n + {1/2}},R}\left( {{or}\quad \varphi_{{i + {1/2}},j}^{{n + {1/2}},R}} \right)} & \quad & {{{if}\quad {\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}}} < 0} \\ \frac{u_{{i + {1/2}},j}^{{n + {1/2}},L} + u_{{i + {1/2}},j}^{{n + {1/2}},R}}{2} & \left( {{or}\quad \frac{\varphi_{{i + {1/2}},j}^{{n + {1/2}},L} + \varphi_{{i + {1/2}},j}^{{n + {1/2}},R}}{2}} \right) & {{{if}\quad {\overset{\_}{u}}_{{i + {1/2}},j}^{n + {1/2}}} = 0.} \end{matrix} \right.} & (54) \\ {u^{e} - {\frac{1}{\rho \left( \varphi^{n} \right)}{\nabla q}}} & (55) \\ {{\nabla{\cdot \left( {\frac{1}{\rho \left( \varphi^{n} \right)}{\nabla q}} \right)}} = {\nabla{\cdot {u^{e}.}}}} & (56) \\ {{\nabla_{\Xi}{\cdot {\overset{\_}{u}}^{e}}} = {\nabla_{\Xi}{\cdot {\left( {\frac{g^{2}}{{\rho \left( \varphi^{n} \right)}J}{TT}^{T}{\nabla_{\Xi}q}} \right).}}}} & (57) \\ {q = {\Delta \quad {{tp}^{BC}\left( t^{n + {1/2}} \right)}}} & (58) \\ \left. u^{e}\leftarrow{u^{e} - {\frac{g^{2}}{{\rho \left( \varphi^{n} \right)}J}{TT}^{T}{{\nabla_{\Xi}q}.}}} \right. & (59) \\ \begin{matrix} {{D_{\xi}^{c}(u)}_{i,j} = {\left( {u_{{i + 1},j} - u_{{i - 1},j}} \right)/2}} \\ {{{D_{\xi}^{+}(u)}_{i,j} = \left( {u_{{i + 1},j} - u_{i,j}} \right)},} \\ {{D_{\xi}^{c}(u)}_{i,j} = {\left( {u_{i,j} - u_{{i - 1},j}} \right).}} \end{matrix} & (60) \\ {{\delta_{\lim}(u)}_{i,j} = \left\{ \begin{matrix} {\min \left( {{2{{D_{\xi}^{-}(u)}_{i,j}}},{2{{D_{\xi}^{+}(u)}_{i,j}}}} \right)} & {{{if}\quad \left( {D_{\xi}^{-}(u)}_{i,j} \right)} > 0} \\ 0 & {{otherwise},} \end{matrix} \right.} & (61) \\ {\left( u_{\xi} \right)_{i,j} = {{\min \left( {{{D_{\xi}^{c}(u)}_{i,j}},{\delta_{\lim}(u)}_{i,j}} \right)} \times {{{sign}\left( {D_{\xi}^{c}(u)}_{i,j} \right)}.}}} & (62) \\ {\left( {\overset{\_}{\upsilon}u_{\eta}} \right)_{i,j}^{n} = {{{\max \left( {{\overset{\_}{\upsilon}}_{i,j}^{n},0} \right)}\left( {u_{i,j}^{n} - u_{i,{j - 1}}^{n}} \right)} + {{\min \left( {{\overset{\_}{\upsilon}}_{i,j}^{n},0} \right)}{\left( {u_{i,{j + 1}}^{n} - u_{i,j}^{n}} \right).}}}} & (63) \\ {{\left( {\alpha \quad u_{\xi}} \right)_{\xi} + {\left( {\beta \quad u_{\xi}} \right)\eta} + \left( {\beta \quad u_{\eta}} \right)_{\xi} + \left( {\gamma \quad u_{\eta}} \right)_{\eta}},} & (64) \\ {{\alpha = {g^{2}{J^{- 1}\left( {x_{\eta}^{2} + y_{\eta}^{2}} \right)}}},{\beta = {{- g^{2}}{J^{- 1}\left( {{x_{\xi}x_{\eta}} + {y_{\xi}y_{\eta}}} \right)}}},{\gamma = {g^{2}{{J^{- 1}\left( {x_{\xi}^{2} + y_{\xi}^{2}} \right)}.}}}} & (65) \\ {{{\Delta \quad t} < {\min\limits_{i,j}\left\lbrack {\frac{\Delta \quad \tau}{u},\frac{\Delta \quad z}{\upsilon},{\sqrt{{We}\frac{\rho_{1} + \rho_{2}}{8\quad \pi}}h^{3/2}},{\frac{Re}{2}\frac{\rho^{n}}{\mu^{n}}\left( {\frac{1}{\Delta \quad r^{2}} + \frac{1}{\Delta \quad z^{2}}} \right)^{- 1}},\sqrt{\frac{2h}{F}}} \right\rbrack}},} & (66) \\ {{\rho_{1} = {1070\quad {Kg}\text{/}m^{3}}},{\mu_{1} = {3.7 \times 10^{- 3}\quad {Kg}\text{/}{m \cdot \sec}}},{\sigma = {0.032\quad {Kg}\text{/}\sec^{2}}}} & (67) \\ {{{Re} = 43.4},{{We} = 30.1}} & (68) \end{matrix}$ 

What is claimed is:
 1. A method for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the method comprising the steps of: (a) performing finite difference analysis including solving, with reference to both a quadrilateral grid in a physical space and a uniform square grid in a computational space, equations governing the flow of the first fluid through the channel, wherein the partial differential equations were first derived for the quadrilateral grid in the physical space and then transformed to the computational space for application on the uniform square grid; and (b) simulating the flow of the first fluid through, and ejection from, the channel based on the performed finite difference analysis.
 2. The method of claim 1, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head.
 3. A method for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the method comprising the steps of: (a) deriving partial differential equations applicable to a quadrilateral grid in a physical space, including deriving a viscosity term, a surface tension term, and a level set convection equation for two-phase flows; (b) calculating a transformation for transforming the derived partial differential equations for application to a uniform square grid in a computational space; and (c) solving the derived and transformed partial differential equations to determine the flow of the first fluid through, and ejection from, the channel.
 4. The method of claim 3, wherein in step (c) the derivatives of velocity, pressure, and level set for the flow of the first fluid in the derived and transformed partial differential equations are calculated with reference to the uniform square grid in the computational space.
 5. The method of claim 3, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head.
 6. An apparatus for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the apparatus comprising: means for performing finite difference analysis including solving, with reference to both a quadrilateral grid in a physical space and a uniform square grid in a computational space, equations governing the flow of the first fluid through the channel, wherein the partial differential equations were first derived for the quadrilateral grid in the physical space and then transformed to the computational space for application on the uniform square grid; and means for simulating the flow of the first fluid through, and ejection from, the channel based on the performed finite difference analysis.
 7. The apparatus of claim 6, wherein the performing means comprises a program of instructions embodied in software, hardware, or combination thereof.
 8. The apparatus of claim 6, wherein the simulating means comprises a display for visually observing the simulation.
 9. The apparatus of claim 6, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head.
 10. An apparatus for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the apparatus comprising: means for deriving partial differential equations applicable to a quadrilateral grid in a physical space, including deriving a viscosity term, a surface tension term, and a level set convection equation for two-phase flows; means for calculating a transformation for transforming the derived partial differential equations for application to a uniform square grid in a computational space; and means for solving the derived and transformed partial differential equations to determine the flow of the first fluid through, and ejection from, the channel.
 11. The apparatus of claim 10, wherein the solving means calculates, with reference to the uniform square grid in the computational space, the derivatives of velocity, pressure, and level set for the flow of the first fluid in the derived and transformed partial differential equations.
 12. The apparatus of claim 10, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head.
 13. A machine-readable medium having a program of instructions for directing a machine to perform a method for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the program of instructions comprising instructions for: (a) performing finite difference analysis including solving, with reference to both a quadrilateral grid in a physical space and a uniform square grid in a computational space, equations governing the flow of the first fluid through the channel, wherein the partial differential equations were first derived for the quadrilateral grid in the physical space and then transformed to the computational space for application on the uniform square grid; and. (b) simulating the flow of the first fluid through, and ejection from, the channel based on the performed finite difference analysis.
 14. The machine-readable medium of claim 13, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head.
 15. A machine-readable medium having a program of instructions for directing a machine to perform a method for simulating and analyzing fluid flow through, and ejection from, a channel having a boundary between a first fluid that flows through the channel and a second fluid, the program of instructions comprising instructions for: (a) deriving partial differential equations applicable to a quadrilateral grid in a physical space, including deriving a viscosity term, a surface tension term, and a level set convection equation for two-phase flows; (b) calculating a transformation for transforming the derived partial differential equations for application to a uniform square grid in a computational space; and (c) solving the derived and transformed partial differential equations to determine the flow of the first fluid through, and ejection from, the channel.
 16. The machine-readable medium of claim 15, wherein in instructions (c) the derivatives of velocity, pressure, and level set for the flow of the first fluid in the derived and transformed partial differential equations are calculated with reference to the uniform square grid in the computational space.
 17. The machine-readable medium of claim 15, wherein the first fluid is ink, the second fluid is air, and the channel comprises an ink-jet nozzle that is part of a piezoelectric ink-jet head. 